<?php
/**
 *
 * PHP 5
 *
 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
 * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
 *
 * Licensed under The MIT License
 * Redistributions of files must retain the above copyright notice.
 *
 * @copyright     Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
 * @link          http://cakephp.org CakePHP(tm) Project
 * @package       Cake.View.Layouts
 * @since         CakePHP(tm) v 0.10.0.1076
 * @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
 */

$cakeDescription = __d('cake_dev', 'SIGEM: Sistema de Gerenciamento de Empréstimos');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<?php echo $this->Html->charset(); ?>
	<title>
		<?php echo $cakeDescription ?>:
		<?php echo $title_for_layout; ?>
	</title>
	<?php
		echo $this->Html->meta("viewport", "width=device-width, initial-scale=1.0");
		echo $this->Html->meta("description", "Sistema de Gerenciamento de Empréstimos de Bens Materiais");
		echo $this->Html->meta("author", "Diovane Monteiro, Renan Reis, Kathlen Brun, Marcos Pessoa");
		echo $this->Html->meta('icon');
		
		echo $this->Html->css('jquery-ui/redmond/jquery-ui.min');
     	echo $this->Html->css('bootstrap.min');
		echo $this->Html->css('bootstrap-responsive.min');
		echo $this->Html->css('font-awesome/font-awesome');
		echo $this->Html->css('select2');
		echo $this->Html->css('select2-bootstrap');
		echo $this->Html->css('application');
				
		echo $this->Html->script('jquery');
		echo $this->Html->script('select2.min');
						
		echo $this->fetch('meta');
		echo $this->fetch('css');
		echo $this->fetch('script');
		
		echo $this->Html->scriptBlock('baseUrl= "' . Router::url('/', true) . '";');
	?>
	
	<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
	<!--[if lt IE 9]>
	  <?php echo $this->Html->css('iefix'); ?>
      <?php echo $this->Html->script('html5shiv'); ?>
    <![endif]-->
    
</head>
<body>

	<!-- Start Header --> 
	<div id="header">
	  <div class="header-inner container-fluid">
			<div class="header-title">
				<?php echo $this->Html->image('logo-ufam.png', array('class' => 'logo'));?>
				<h3 class="title">SIGEM&nbsp;<small>Sistema de Gerenciamento de Empréstimos de Equipamentos</small></h3>
				<?php echo $this->Html->image('logos_icomp.png', array('class' => 'logo-icomp'));?>
  			</div>
			<div class="user-controls">
				<a href="#add-link" class="nav-link add-link hidden-phone">Dashboard</a>
		        <?php echo $this->Html->link('Novo Empréstimo', array('controller' => 'emprestimos', 'action' => 'add'), array('class' => 'nav-link add-link hidden-phone'))?> |
		        <div class="banner-dropdown">
					<a href="#" class="nav-link dropdown">
		            	<span class="banner-name hidden-tablet">dmonteiro</span>
		            	<span class="avatar-container">
		              	<span class="dropdown-carrot left"></span>
		              	<?php echo $this->Html->image('default-avatar.jpg', array('class' => 'avatar'));?>
		            	</span>
		          	</a>
					<ul class="dropdown-menu">
						<li><a href="#add-link"class="hidden-desktop visible-tablet">Add link</a></li>
			            <li><a href="/settings">Settings</a></li>
			            <li><a href="/tools">Tools</a></li>
			            <li><a href="/help">Help</a></li>
			            <li><a href="#sign-out">Sign out</a></li>
			        </ul>
				</div>
  			</div>
  		</div>
	</div>
	<!-- End Header --> 

	<div id="wrapper">
	
		<!-- Start Content -->
		<div id="content">
		
			<!-- Start Sidebar --> 
			<div id="sidebar">
				<div class="account-container">
					<div class="account-avatar">
						<?php echo $this->Html->image('default-avatar.jpg', array('class' => 'thumbnail'));?>
					</div> <!-- /account-avatar -->
					<div class="account-details">
						<span class="account-name"><?php echo $this->Session->read('Auth.User.nome'); ?></span>
						<span class="account-role"><?php echo $this->Session->read('Auth.User.Perfil.nome'); ?></span>
						<span class="account-actions">
							<?php echo $this->Html->link('Minha Conta', array('controller' => 'usuarios', 'action' => 'profile'))?> |
							<?php echo $this->Html->link('Sair', array('controller' => 'usuarios', 'action' => 'logout')); ?>
						</span>
					</div> <!-- /account-details -->
				</div>
				
				<ul class="nav nav-list">
					<li class="nav-header"><i class="icon-home"></i> Administração</li>
					<li><?php echo $this->Html->link('Usuários', array('controller' => 'usuarios', 'action' => 'index'))?></li>
					<li><?php echo $this->Html->link('Categorias', array('controller' => 'categorias', 'action' => 'index'))?></li>
					<li><?php echo $this->Html->link('Localizações', array('controller' => 'localizacaos', 'action' => 'index'))?></li>
					<li><?php echo $this->Html->link('Alunos', array('controller' => 'alunos', 'action' => 'index'))?></li>					
					<li><?php echo $this->Html->link('Projetos', array('controller' => 'projetos', 'action' => 'index'))?></li>
					<li><?php echo $this->Html->link('Equipamentos', array('controller' => 'equipamentos', 'action' => 'index'), array('escape' => false))?></li>
					<li class="nav-header"><i class="icon-wrench"></i> Movimentação</li>
					<li><?php echo $this->Html->link('Empréstimos', array('controller' => 'emprestimos', 'action' => 'index'))?></li>
					<li><?php echo $this->Html->link('Devolução', array('controller' => 'emprestimos', 'action' => 'devolucao'))?></li>
					<li><?php echo $this->Html->link('Renovação', array('controller' => 'emprestimos', 'action' => 'renovacao'))?></li>
					<li><?php echo $this->Html->link('Reserva', array('controller' => 'emprestimos', 'action' => 'reserva'))?></li>
					<li class="nav-header"><i class="icon-signal"></i> Relatórios</li>
					<li class="dropdown-submenu">
						<a tabindex="-1" href="#">Empréstimos</a>
						<ul class="dropdown-menu">
							<li><?php echo $this->Html->link('Empréstimos por Aluno', array('controller' => 'relatorios', 'action' => 'emprestimos_aluno')); ?></li>
							<li><?php echo $this->Html->link('Equipamentos por Categoria e Localização', array('controller' => 'relatorios', 'action' => 'equipamentos_categoria_localizacao')); ?></li>
							<li><?php echo $this->Html->link('Equipamentos em Atraso', array('controller' => 'relatorios', 'action' => 'equipamentos_atraso'))?></li>
							<li><?php echo $this->Html->link('Equipamentos Emprestados', array('controller' => 'relatorios', 'action' => 'equipamentos_emprestados')); ?></li>
							<li><?php echo $this->Html->link('Histórico de empréstimo', array('controller' => 'relatorios', 'action' => 'equipamentos_historico')); ?></li>	
						</ul>		
					</li>
				</ul>
			</div>
			<!-- End Sidebar --> 
	    
		    <!-- Start Main --> 
		    <div id="main" class="container-fluid">	
		    	<div class="row-fluid">
					<?php echo $this->Session->flash('auth'); ?>
					<?php echo $this->Session->flash(); ?>
					<?php echo $this->fetch('content'); ?>
				</div>
			</div>
			<!-- End Main -->
			
			<div class="clearfix"></div>
		</div>
		<!-- End Content --> 
		
		<!-- Start Footer -->   
		<div id="footer">
	  		<p>&copy; Copyright 2013. ICOMP - Instituto de Computação. Todos os direitos reservados.</p>
	  	</div>
	  	<!-- End Footer --> 	
	  		
	</div>
		
    <div id="ajax-indicator" class="hide"><i class="icon-awesome-spinner icon-spin icon-large"></i> Carregando...</div>
    <div id="window-modal" class="modal hide fade" tabindex="-1"></div>
    
    <?php echo $this->Html->script('jquery-ui'); ?>
    <?php echo $this->Html->script('jquery.ui.datepicker-pt-BR');?>
    <?php echo $this->Html->script('jquery.maskedinput'); ?>
    <?php echo $this->Html->script('bootstrap'); ?>    
	<?php echo $this->Js->writeBuffer();?>
	<?php echo $this->element('sql_dump'); ?>
</body>
</html>
